import requests
# 定义 ihrm 登录接口 类
class IhrmLoginApi(object):
    # 定义方法
    @classmethod
    def login(cls, req_data):
        resp = requests.post(url="https://ihrm-java.itheima.net/api/sys/login",json=req_data)
        return resp  #返回响应体

if __name__ == '__main__':
    data = {"mobile": "13800000002", "password": "929itheima.CN032@.20250609"}
    resp=IhrmLoginApi.login(data)
    print("登陆成功：",resp.json())